package _03_FunCall;

import java.util.function.Function;

public class _05_ArrayCall {

	public static void main(String[] args) {
		// lambda
		Function<Integer, int[]> fun = (n) -> new int[n];
		int[] arr1 = fun.apply(10);
		System.out.println(arr1.length);

//		10

		// 数组引用
		fun = int[]::new;
		int[] arr2 = fun.apply(5);
		System.out.println(arr2.length);

//		5

	}
}
